﻿using System;
using System.Collections.Generic;
using System.Linq;
using NorthwindModel;
using NorthwindModel.IRepositories;
using NorthwindModel.Models;
using System.Data;

namespace NorthwindDAL.Repositories
{
    public partial class CustomerRepository : BaseRepository<Customer>
    {
        public Customer FindCustomerByID(string customerID)
        {
            Customer customer = base.FindSingleBy(customerEntity => customerEntity.CustomerID.Contains(customerID));
            return customer;
        }

        public List<Customer> FindCustomersIDContains(string customerIDKeyWork)
        {
            List<Customer> customers = base.FindAllBy(customerEntity => customerEntity.CustomerID.Contains(customerIDKeyWork)).ToList();
            return customers;
        }
    }
}
